//
//  Array+Extension.swift
//  GXLSwiftTools
//
//  Created by 李恶魔 on 2020/5/28.
//  https://www.jianshu.com/p/18f1d37fd684

import UIKit

extension Array {
    /// let label = labels[safe:i]
    subscript (safe index: Int) -> Element? {
        return (0 ..< count).contains(index) ? self[index] : nil
    }
}
